<template>
  <div id="app"  class="screen-full" >
	
     <router-view></router-view>
	 
	 <div v-if="toastMsg != ''" class="toast box-center" @click="toast('')">
		 {{toastMsg}}
	 </div>
  </div>
</template>

<script> 

export default {
  name: 'App',
  data(){
	return {
		toastMsg:'',
		toastTimer:0,
	}  
  },
  components: { 
  },
  
  created(){
	window.App = this;  
  },
  
  methods:{
	  toast(msg, seconds){
		  if(!seconds)
			seconds = 3000;
		  this.toastMsg = msg;
		  if(this.toastTimer != 0){
			  window.clearTimeout(this.toastTimer); 
		  }
		  this.toastTimer = window.setTimeout(()=>{
			   this.toastMsg = '';
			   this.toastTimer = 0;
		  },seconds);
	  }
  }
}
</script>

<style  >
	 
	#app {
	  font-family: 微软雅黑;
	  -webkit-font-smoothing: antialiased;
	  -moz-osx-font-smoothing: grayscale;
	  text-align: center;
	  color: #2c3e50; 
	}
</style>
